//
//  ResultView.h
//  MobileZIPCodes
//
//  Created by Andreas Schwelling on 02.12.07.
//	http://www.andi.de/zipcodes/
// 
//  Released under the GNU General Public License.
//  See LICENSE for details.
//
//  Use at your own risk.
//


#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <UIKit/UITransitionView.h>
#import <UIKit/UIPreferencesTable.h>
#import <UIKit/UISectionList.h>
#import <UIKit/UISegmentedControl.h>
#import <UIKit/UISwitchControl.h>
#import <UIKit/UIPreferencesTextTableCell.h>
#import <UIKit/UIButtonBar.h>
#import <UIKit/UIProgressIndicator.h>
#import <UIKit/UIProgressHUD.h>
#import <UIKit/UIFrameAnimation.h>
#import <WebCore/WebFontCache.h>

#import "DataManager.h"
#import "SQLiteDB.h"

@class MobileZIPCodesApp;

@interface ResultViewPrefTable : UIPreferencesTable {
	int			_delable,_insertable;
}

-(void)setDeletable:(int)nr;
-(void)setInsertable:(int)nr;


@end

@interface SearchNameResultView : UIView {
	ResultViewPrefTable *_table;
	UIView			*_prevView;
	id				_delegate;
	
	int				_numberofzipcodegroups;
	NSMutableArray	*_zipcodes;
	NSString		*_city;
	NSString		*_state;
	NSString		*_country;
	NSString		*_addendum1;
	
	NSString		*_favourstr;
	
	BOOL			_isfavoured;
	
	
	UIProgressHUD	*_uiphud;
}

-(id)initWithFrame:(CGRect)frame;
- (void) dealloc;
-(void)setCity:(NSString*)city;
-(void)setState:(NSString*)state;
-(void)setCountry:(NSString*)country;
- (void) fetchData;
-(void) buildContent:(id)p;
-(void)setDelegate:(id)del;
-(void)setPrevView:(UIView*)pv;
-(UIView*)getPrevView;

@end


@interface SearchZipResultView : UIView {
	ResultViewPrefTable *_table;
	UIView			*_prevView;
	id				_delegate;
	
	NSString		*_zipcode;
	NSString		*_city;
	NSString		*_state;
	NSString		*_country;
	NSString		*_addendum1;
	
	NSString		*_favourstr;
	
	BOOL			_isfavoured;
	
	UIProgressHUD	*_uiphud;
}

-(id)initWithFrame:(CGRect)frame;
- (void) dealloc;
-(void)setZipcode:(NSString*)zipcode;
-(void)setState:(NSString*)state;
-(void)setCountry:(NSString*)country;
- (void) fetchData;
-(void) buildContent:(id)p;
-(void)setDelegate:(id)del;
-(void)setPrevView:(UIView*)pv;
-(UIView*)getPrevView;

@end



